﻿
@{
    Layout = "~/Views/Shared/_LayoutBoot.cshtml";
}
<link rel="stylesheet" href="~/css/Login.css" />
<script>
    function reloadVerifyCode() {
        $("#img_VerifyCode").attr("src", "/Default/GetVerifyCode?" + Math.random());
    }
    function success(msg) {
        if (msg.IsOK) {
            var msgs = msg.ErrMsg.split("|");
            if (msgs[1] != undefined && msgs[1] != null && msgs[1] != "")
                alert(msgs[1]);
            window.location.href = msgs[2];
        }
        else {
            alert(msg.ErrMsg);
            reloadVerifyCode();
            $("#LoginVerifyCode").val("");
            //$("#div_Login").css("visibility", "visible");
            //$("#div_main").css("visibility", "hidden");
        }
    }
    document
</script>

<div class="container-fluid bg1">
    <div class="container">
        <form action="/Default/Login" name="form_login" method="post" id="=form_login" data-ajax="true" data-ajax-success="success" data-ajax-method="POST">
            <div class="div1">
                <div class="div_form">
                    <div class="row" style="padding:10px;">
                        <div class="input-group">
                            <input type="text" class="form-control col-xl-8" id="LoginName" name="LoginName" required autocomplete="off" placeholder="请输入用户名" maxlength="20" />
                        </div>
                    </div>
                    <div class="row" style="padding:10px;">
                        <div class="input-group">
                            <input type="password" class="form-control col-xl-8" id="LoginPass" name="LoginPass" required autocomplete="off" placeholder="请输入密码" maxlength="20" />
                        </div>
                    </div>
                    <div class="row" style="padding:10px;">
                        <div class="input-group">
                            <input type="text" class="form-control col-xl-4" id="LoginVerifyCode" name="LoginVerifyCode" required autocomplete="off" placeholder="请输入验证码" maxlength="6" style="max-width:185px;" />
                            <img src="/Default/GetVerifyCode" class="col-xl-3" style="height:38px;" id="img_VerifyCode" onclick="reloadVerifyCode();" />
                        </div>
                    </div>
                    <div class="row" style="padding:10px;">
                        <div class="input-group">
                            <button class="btn btn-primary col-xl-8">登录</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>